package com.hzit.controller;

import com.hzit.pojo.R;
import com.hzit.pojo.Student;
import com.hzit.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@RestController
public class StudentController {
	@Autowired
	private StudentService studentService;
	@GetMapping("/student/list")
	public R findAll(){
		List<Student> studentList = studentService.findAll();
		return R.ok().data("students",studentList);
	}
}
